package com.htj.exception;

import com.htj.common.ResultCodeEnum;
import lombok.Data;

@Data
public class TokenException extends RuntimeException {
    private Integer code;//错误码
    private ResultCodeEnum resultCodeEnum;
    public TokenException(String message, Integer code) {
        super(message);
        this.code=code;
    }
    public TokenException(String message, ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMsg());
        this.code=resultCodeEnum.getCode();
        this.resultCodeEnum = resultCodeEnum;
    }
    public TokenException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMsg());
        this.code=resultCodeEnum.getCode();
        this.resultCodeEnum = resultCodeEnum;
    }

    public void printStackTrace(String msg) {
    }
}
